package svgedit.svg;

import java.awt.Rectangle;
import java.awt.Shape;
import java.util.ArrayList;

import svgedit.gui.Marker;

/**
 * This interface implements all the methods required for shapes to be drawn and
 * edited in the view. All shapes and SVGGroups must implement this interface
 */
public interface SVGDrawable
{
	/**
	 * Creates a shape representation for the View Call on a Group and it will
	 * create the shape for that group.
	 * 
	 * @return java.awt.Shape
	 */
	public Shape createShape();

	/**
	 * Create an AWT Rectangle representing this elements min and max x and y
	 * values.
	 * 
	 * @see java.awt.Rectangle
	 * 
	 * @return a new rectangle representing the bounds of shape
	 */
	public Rectangle getBounds();

	/**
	 * Create and AWT Shape to represent the selection box for this element
	 * 
	 * @return stroked selection shape
	 */
	public Shape getSelectionStroke();

	/**
	 * Returns an ArrayList with all the Markers for this element.
	 * 
	 * @see svgedit.gui.Marker
	 * @return java.util.ArrayList
	 */
	public ArrayList<Marker> getMarkers();

	/**
	 * Used to move the Element. The params deltaX and deltaY set the amount to
	 * move the element. If the element is a group its decendants are moved
	 * 
	 * @param deltaX
	 * @param deltaY
	 */
	public void drag(double deltaX, double deltaY, Marker.MarkerType mType);

}
